package com.example.one.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Copyright (C), 2017-2022, MIDOU
 * ClassName: WalletDetails
 * Author:   pangshu
 * Date:     2022/10/28 17:30
 * Version: 1.0
 * Description:账单明细
 * `operation_type` INT COMMENT '操作类型',
 * `operation_time` DATE  COMMENT '时间',
 * `one_type` INT COMMENT '操作成功或失败',
 * `payer_id` INT NOT NULL COMMENT '支出方（外键）',
 * `come_id` INT NOT NULL COMMENT '收入方（外键）'
 */
@Data
@TableName(value = "wallet_detailed")
public class WalletDetails {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @TableField(value = "amount")
    private Float amount;//金额

    @TableField(value = "operation_type")
    private Integer operationType;//操作类型，1:支付，2：退款

    @TableField("operation_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date operationTime;

    @TableField("one_type")
    private Integer oneType;//操作状态，0：失败，1：成功

    @TableField("payer_id")
    private Integer payerId;//支出方

    @TableField("come_id")
    private Integer comeId;//收款方

}
